//bat 主动触发脚本,所有代码在本js中执行,不会向外暴露,主动修改,不用前端请求
const pool = require('../db/index.js')

const getAllUserInfo = async () => {
	try{
		const [res, fields] = await pool.execute('SELECT * FROM userinfo')
		console.log('res',res)
		return res
	}catch(err){
		console.log('getAllUserInfo_err:',err)
		return err
	}
}

// getAllUserInfo()